package com.yh.workbill.db;

import java.util.List;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

@Dao
public interface UnitCompanyDao {

    @Insert
    void add(UnitCompany... unitCompany);

    @Delete
    void delect(UnitCompany... unitCompanys);

    @Query("SELECT * FROM t_unitcompany")
    LiveData<List<UnitCompany>> getUnitComanys();

    @Query("DELETE FROM t_unitcompany WHERE usename=:name")
    void delectName(String name);


    @Query("SELECT * FROM t_unitcompany WHERE usename=:usename ")
    UnitCompany getUnitComany(String usename);
}
